package com.mervin.patterns.factory.abstractfactory;

/***************************************
 * @Auther: mervin
 * @Date: 2020-04-17 00:48
 * @Description:
 ***************************************/
public class Client {

    public static void main(String[] args) {
        CreateFactory northernCreateFactory = new NorthernCreateFactory();
        IFruit northerFruit = northernCreateFactory.createFruit();
        IVeggie northerVeggie = northernCreateFactory.createVeggie();
        northerFruit.show(); // I am 南方水果
        northerVeggie.show(); // I am 南方蔬菜

        TropicalCreateFactory tropicalCreateFactory = new TropicalCreateFactory();
        IFruit tropicalFruit = tropicalCreateFactory.createFruit();
        IVeggie tropicalVeggie = tropicalCreateFactory.createVeggie();

        tropicalFruit.show();  // I am 热带水果
        tropicalVeggie.show(); // I am 热带蔬菜
    }
}
